<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ page import="java.util.Date"%>
<%
	Long time = new Date().getTime();
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<title>魔方抓取结点系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="/pages/common/header.jsp"%>

</head>
<body>
	<form id="formDataValidate">
	<div align="center">
	<select dataType='Require' class="form-control" id="companyIdID" style="width: 200px;"
			name="companyId">
			<option value="">-请选择-</option>
		</select> <input maxlength="16" type="text" name="depName" dataType="NotEmpty" style="width: 200px;" id="inputTest"
			class="form-control">
		<button id="validata" ,autocomplete="off" data-loading-text="正在加载"
			class="btn btn-xs btn-primary" type="button">查询详情</button>
	</div>
	</form>
	<section id="dept_select_company"></section>
	<div id="page"></div>
	<div id="list"></div>


	<script>
		var contextPath = '${pageContext.request.contextPath}';
		var _page = page({
			renderTo : "page",
			pageSize : 20,
			subHandler : function(data) {

			}
		});
		_page.init();
		_page.render(100, 20);
		;

		var _grid = grid({
			renderTo : 'list',
			columns : [
					{
						name : '部门名称',
						dataIndex : 'id'
					},
					{
						name : '所属机构',
						dataIndex : 'target'
					},
					{
						name : '所属体系',
						dataIndex : 'employee.person.email'
					},
					{
						name : '上级部门',
						dataIndex : 'employee.person.name',
						renderer : function(data) {

							return '<li class="table-mergeCell-li"><div class="_gird_overflow_tip" tipSize=20">ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss</div></li>';
						}
					},
					{
						name : '操作',
						renderer : function(data) {
							return '<a class="btn btn-xs btn-primary" id="assignMember">添加成员</a>&nbsp;<a id="findMember">查看成员</a>&nbsp;<a id="updateDept">修改部门</a>&nbsp;<a id="delDept">删除部门</a>';
						},
						rendererCall : function(obj) {
						}
					} ]
		});

		util.mofangAjax({
			url : 'js/data.js',
			succFun : function(json) {
				_grid.init().addDatas({
					rowDatas : json.Rows
				});
			}
		});

		$('#validata').click(function() {
			var form = $('#formDataValidate');
			if (!Validator.Validate(form[0], 3));
		});
		
	</script>
</body>
</html>